package com.jbm.jbmsupplier.util;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.List;

/**
 * Created by lyh on 2017-03-07.
 */
////@Entity
////@Table(name = "iorder", schema = "", catalog = "jbmcore")
////@org.hibernate.annotations.Entity(dynamicUpdate=true,dynamicInsert=true)
public class IorderEntity extends ICtrl  implements Serializable {

    private static final long serialVersionUID = -5404932865531346611L;
    private int orderId;
    private String orderCode;  //订单编号
    private int memberId;
    private int sellerId;
    private int caddrId;
    private String itemDesc;
    private String type;
    private String status;
    private Timestamp createDate;
    private int createId;
    private Timestamp expireDate;
    private Timestamp closeDate;
    private Integer closeId;
    private String ctStr;
    private String comDesc;
    private Integer comSpeedLevel;
    private Integer comQualityLevel;
    private Integer comAttitudeLevel;
    private Timestamp comDate;
    private double amount;
    private Integer oldSellerId;
    private Integer sactId;
    private Integer voucher;
    private String contacts;  //联系人
    private String mobile;    //联系电话
    private String giText;   //地址
    private List<JobOrderEntity> joborderlist;
    private  List<OrdAttachmentEntity>   ordattachmentlist;
     private    int is_inner;
    private String nickname ;//创建人 评论人昵称


    public  IorderEntity(){}

    public  IorderEntity(boolean back,String errorinfo)
    {
        this.back= back;
        this.errorinfo=errorinfo;

    }


    public void setMemberId(Integer memberId) {
        this.memberId = memberId;
    }

    public void setCaddrId(Integer caddrId) {
        this.caddrId = caddrId;
    }

    ////@Id
    ////@Column(name = "order_id")
    ////@GeneratedValue
    public int getOrderId() {
        return orderId;
    }

    public void setOrderId(int orderId) {
        this.orderId = orderId;
    }

    ////@Basic
    ////@Column(name = "order_code")
    public String getOrderCode() {
        return orderCode;
    }

    public void setOrderCode(String orderCode) {
        this.orderCode = orderCode;
    }

    ////@Basic
    ////@Column(name = "member_id")
    public int getMemberId() {
        return memberId;
    }

    public void setMemberId(int memberId) {
        this.memberId = memberId;
    }

    ////@Basic
    ////@Column(name = "seller_id")
    public int getSellerId() {
        return sellerId;
    }

    public void setSellerId(int sellerId) {
        this.sellerId = sellerId;
    }

    ////@Basic
    ////@Column(name = "caddr_id")
    public int getCaddrId() {
        return caddrId;
    }

    public void setCaddrId(int caddrId) {
        this.caddrId = caddrId;
    }

    ////@Basic
    ////@Column(name = "item_desc")
    public String getItemDesc() {
        return itemDesc;
    }

    public void setItemDesc(String itemDesc) {
        this.itemDesc = itemDesc;
    }

    ////@Basic
    ////@Column(name = "type")
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    ////@Basic
    ////@Column(name = "status")
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    ////@Basic
    ////@Column(name = "create_date")
    public Timestamp getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Timestamp createDate) {
        this.createDate = createDate;
    }

    ////@Basic
    ////@Column(name = "create_id")
    public int getCreateId() {
        return createId;
    }

    public void setCreateId(int createId) {
        this.createId = createId;
    }

    ////@Basic
    ////@Column(name = "expire_date")
    public Timestamp getExpireDate() {
        return expireDate;
    }

    public void setExpireDate(Timestamp expireDate) {
        this.expireDate = expireDate;
    }

    ////@Basic
    ////@Column(name = "close_date")
    public Timestamp getCloseDate() {
        return closeDate;
    }

    public void setCloseDate(Timestamp closeDate) {
        this.closeDate = closeDate;
    }

    ////@Basic
    ////@Column(name = "close_id")
    public Integer getCloseId() {
        return closeId;
    }

    public void setCloseId(Integer closeId) {
        this.closeId = closeId;
    }

    ////@Basic
    ////@Column(name = "ct_str")
    public String getCtStr() {
        return ctStr;
    }

    public void setCtStr(String ctStr) {
        this.ctStr = ctStr;
    }

    ////@Basic
    ////@Column(name = "com_desc")
    public String getComDesc() {
        return comDesc;
    }

    public void setComDesc(String comDesc) {
        this.comDesc = comDesc;
    }

    ////@Basic
    ////@Column(name = "com_speed_level")
    public Integer getComSpeedLevel() {
        return comSpeedLevel;
    }

    public void setComSpeedLevel(Integer comSpeedLevel) {
        this.comSpeedLevel = comSpeedLevel;
    }

    ////@Basic
    ////@Column(name = "com_quality_level")
    public Integer getComQualityLevel() {
        return comQualityLevel;
    }

    public void setComQualityLevel(Integer comQualityLevel) {
        this.comQualityLevel = comQualityLevel;
    }

    ////@Basic
    ////@Column(name = "com_attitude_level")
    public Integer getComAttitudeLevel() {
        return comAttitudeLevel;
    }

    public void setComAttitudeLevel(Integer comAttitudeLevel) {
        this.comAttitudeLevel = comAttitudeLevel;
    }

    ////@Basic
    ////@Column(name = "com_date")
    public Timestamp getComDate() {
        return comDate;
    }

    public void setComDate(Timestamp comDate) {
        this.comDate = comDate;
    }

    ////@Basic
    ////@Column(name = "amount")
    public double getAmount() {
        return amount;
    }

    public void setAmount(double amount) {
        this.amount = amount;
    }

    ////@Basic
    ////@Column(name = "old_seller_id")
    public Integer getOldSellerId() {
        return oldSellerId;
    }

    public void setOldSellerId(Integer oldSellerId) {
        this.oldSellerId = oldSellerId;
    }

    ////@Basic
    ////@Column(name = "sact_id")
    public Integer getSactId() {
        return sactId;
    }

    public void setSactId(Integer sactId) {
        this.sactId = sactId;
    }

    ////@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        IorderEntity that = (IorderEntity) o;

        if (caddrId != that.caddrId) return false;
        if (createId != that.createId) return false;
        if (memberId != that.memberId) return false;
        if (orderId != that.orderId) return false;
        if (sellerId != that.sellerId) return false;
       // if (amount != null ? !amount.equals(that.amount) : that.amount != null) return false;
        if (closeDate != null ? !closeDate.equals(that.closeDate) : that.closeDate != null) return false;
        if (closeId != null ? !closeId.equals(that.closeId) : that.closeId != null) return false;
        if (comAttitudeLevel != null ? !comAttitudeLevel.equals(that.comAttitudeLevel) : that.comAttitudeLevel != null)
            return false;
        if (comDate != null ? !comDate.equals(that.comDate) : that.comDate != null) return false;
        if (comDesc != null ? !comDesc.equals(that.comDesc) : that.comDesc != null) return false;
        if (comQualityLevel != null ? !comQualityLevel.equals(that.comQualityLevel) : that.comQualityLevel != null)
            return false;
        if (comSpeedLevel != null ? !comSpeedLevel.equals(that.comSpeedLevel) : that.comSpeedLevel != null)
            return false;
        if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false;
        if (ctStr != null ? !ctStr.equals(that.ctStr) : that.ctStr != null) return false;
        if (expireDate != null ? !expireDate.equals(that.expireDate) : that.expireDate != null) return false;
        if (itemDesc != null ? !itemDesc.equals(that.itemDesc) : that.itemDesc != null) return false;
        if (oldSellerId != null ? !oldSellerId.equals(that.oldSellerId) : that.oldSellerId != null) return false;
        if (orderCode != null ? !orderCode.equals(that.orderCode) : that.orderCode != null) return false;
        if (sactId != null ? !sactId.equals(that.sactId) : that.sactId != null) return false;
        if (status != null ? !status.equals(that.status) : that.status != null) return false;
        if (type != null ? !type.equals(that.type) : that.type != null) return false;

        return true;
    }

    ////@Override
    public int hashCode() {
        int result = orderId;
        result = 31 * result + (orderCode != null ? orderCode.hashCode() : 0);
        result = 31 * result + memberId;
        result = 31 * result + sellerId;
        result = 31 * result + caddrId;
        result = 31 * result + (itemDesc != null ? itemDesc.hashCode() : 0);
        result = 31 * result + (type != null ? type.hashCode() : 0);
        result = 31 * result + (status != null ? status.hashCode() : 0);
        result = 31 * result + (createDate != null ? createDate.hashCode() : 0);
        result = 31 * result + createId;
        result = 31 * result + (expireDate != null ? expireDate.hashCode() : 0);
        result = 31 * result + (closeDate != null ? closeDate.hashCode() : 0);
        result = 31 * result + (closeId != null ? closeId.hashCode() : 0);
        result = 31 * result + (ctStr != null ? ctStr.hashCode() : 0);
        result = 31 * result + (comDesc != null ? comDesc.hashCode() : 0);
        result = 31 * result + (comSpeedLevel != null ? comSpeedLevel.hashCode() : 0);
        result = 31 * result + (comQualityLevel != null ? comQualityLevel.hashCode() : 0);
        result = 31 * result + (comAttitudeLevel != null ? comAttitudeLevel.hashCode() : 0);
        result = 31 * result + (comDate != null ? comDate.hashCode() : 0);
       // result = 31 * result + (amount != null ? amount.hashCode() : 0);
        result = 31 * result + (oldSellerId != null ? oldSellerId.hashCode() : 0);
        result = 31 * result + (sactId != null ? sactId.hashCode() : 0);
        return result;
    }

    ////@Basic
    ////@Column(name = "voucher")
    public Integer getVoucher() {
        return voucher;
    }

    public void setVoucher(Integer voucher) {
        this.voucher = voucher;
    }

    ////@Basic
    ////@Column(name = "contacts")
    public String getContacts() {
        return contacts;
    }

    public void setContacts(String contacts) {
        this.contacts = contacts;
    }

    ////@Basic
    ////@Column(name = "mobile")
    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    ////@Basic
    ////@Column(name = "gi_text")
    public String getGiText() {
        return giText;
    }

    public void setGiText(String giText) {
        this.giText = giText;
    }


    ////@Transient
    public List<JobOrderEntity> getJoborderlist() {
        return joborderlist;
    }

    public void setJoborderlist(List<JobOrderEntity> joborderlist) {
        this.joborderlist = joborderlist;
    }
    ////@Transient
    public List<OrdAttachmentEntity> getOrdattachmentlist() {
        return ordattachmentlist;
    }

    public void setOrdattachmentlist(List<OrdAttachmentEntity> ordattachmentlist) {
        this.ordattachmentlist = ordattachmentlist;
    }
    ////@Transient
    public int getIs_inner() {
        return is_inner;
    }

    public void setIs_inner(int is_inner) {
        this.is_inner = is_inner;
    }
    ////@Transient
    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }
}
